package Server.tool;

import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;

public class EntityUtils {


    public static List<Map<String, String>> listConvert(List<Object[]> list) {
        List<Map<String,String>> map = new LinkedList<>();
        for(Object[] objects : list){
            Map<String,String> mo = new LinkedHashMap<>();
            int i=0;
            for(Object obj:objects){
                mo.put(""+i+"",obj.toString());
                i++;
            }
            map.add(mo);
        }
        return map;
    }
}
